<?xml version="1.0" encoding="[% LOCALE %]" standalone="no"?>
<!DOCTYPE status SYSTEM "html/slimserver_xml.dtd">

<status xmlns="http://www.slimdevices.com/slimserver/xml">
	<players>
		<playercount>[% playercount | html %]</playercount>
		<player>
			<is_described/>
			<player_id>[% player %]</player_id>
			[% IF player_name %]<player_name>[% player_name | html %]</player_name>[% END %]
		</player>
		[% IF player_chooser_list %]
		[% player_chooser_list %]
		[% END %]
	</players>
	<player_status>
		<transport>
			<mode>[% mode | html %]</mode>
			<playmode>[% IF modeplay %]playing[% END %][% IF modepause %]paused[% END %][% IF modestop %]stopped[% END %]</playmode>
    		[% IF modeplay %]<playing/>[% END %]
    		[% IF modepause %]<paused/>[% END %]
    		[% IF modestop %]<stopped/>[% END %]
    		[% IF currentsong %]
    		[% IF not modeplay %]<play_url><![CDATA[xml/status.xml?p0=play]]></play_url>[% END %]
    		[% IF not modepause %]<pause_url><![CDATA[xml/status.xml?p0=pause]]></pause_url>[% END %]
    		[% IF not modestop %]<stop_url><![CDATA[xml/status.xml?p0=stop]]></stop_url>[% END %]
    		<play_prev_url><![CDATA[xml/status.xml?p0=playlist&p1=jump&p2=-1]]></play_prev_url>
    		<play_next_url><![CDATA[xml/status.xml?p0=playlist&p1=jump&p2=1]]></play_next_url>
    		[% END %]
 			[% IF rate && currentsong %]<rate>[% rate | html %]</rate>[% END %]
 			[% IF rateval && currentsong %]<rateval>[% rateval | html %]</rateval>[% END %]
 			[% IF sleeptime %]<sleeptime>[% sleeptime | html %]</sleeptime>[% END %]
 			[% IF sleep %]<sleep>[% sleep | html %]</sleep>[% END %]
 		</transport>
		<shuffle>
			[% IF shuffleoff %]<shuffle_off/>[% END %]
    		[% IF shuffleon %]<shuffle_songs/>[% END %]
			[% IF shufflealbum %]<shuffle_albums/>[% END %]
    		[% IF not shuffleoff %]<shuffle_off_url><![CDATA[xml/status.xml?p0=playlist&p1=shuffle&p2=0]]></shuffle_off_url>[% END %]
    		[% IF not shufflealbum %]<shuffle_albums_url><![CDATA[xml/status.xml?p0=playlist&p1=shuffle&p2=2]]></shuffle_albums_url>[% END %]    	
    		[% IF not shuffleon %]<shuffle_songs_url><![CDATA[xml/status.xml?p0=playlist&p1=shuffle&p2=1]]></shuffle_songs_url>[% END %]
    	</shuffle>
		<repeat>
			[% IF repeatone %]<repeat_one/>[% END %]
			[% IF repeatall %]<repeat_all/>[% END %]
			[% IF repeatoff %]<repeat_off/>[% END %]
			[% IF not repeatone %]<repeat_one_url><![CDATA[xml/status.xml?p0=playlist&p1=repeat&p2=1]]></repeat_one_url>[% END %]
			[% IF not repeatall %]<repeat_all_url><![CDATA[xml/status.xml?p0=playlist&p1=repeat&p2=2]]></repeat_all_url>[% END %]
			[% IF not repeatoff %]<repeat_off_url><![CDATA[xml/status.xml?p0=playlist&p1=repeat&p2=0]]></repeat_off_url>[% END %]
		</repeat>
		<audio> 		
		    <volume>[% volume | html %]</volume>
    		<volume_url><![CDATA[xml/status.xml?p0=mixer&p1=volume&p2=___LEVEL___]]></volume_url>
    		<bass>[% bass | html %]</bass>
    		<bass_url><![CDATA[xml/status.xml?p0=mixer&p1=bass&p2=___LEVEL___]]></bass_url>	
			<treble>[% treble | html %]</treble>
			<treble_url><![CDATA[xml/status.xml?p0=mixer&p1=treble&p2=___LEVEL___]]></treble_url>
		</audio>
		
		[% IF currentsong %]	
		<current_song>
			<seconds_elapsed>[% songtime | html %]</seconds_elapsed>
			<seconds_total>[% durationseconds | html %]</seconds_total>
		[% END %]
		<duration>[% itemobj.duration %]</duration>
		[% IF songtitle %]
				<title>[% songtitle %]</title>
		[% END %]
		
		<cover>/music/[% itemobj.id %]/cover.jpg</cover>
		
		[% IF itemobj.artist && itemobj.artist != noArtist %]
		<artist>
		[% PROCESS artistsAsText.html noby=1 notarget=1 %]
					</artist>
		[% END %]
		
					[% IF title %]<song>[% END %]
			[% PROCESS _xml_song.html %]
			[% IF title %]</song>[% END %]
		[% IF currentsong %]
		</current_song>
		[% END %]

	</player_status>

	[% IF playlist %]
	<playlist>
	[% END %]
		[% IF cansave %]<save_url><![CDATA[xml/browse.xml?dir=__playlists%2f__current.m3u]]></save_url>[% END %]
    	[% playlist %]
 	[% IF playlist %]
	</playlist>
	[% END %]  	
</status>
